package com.zkthink.zhl.order.dao;

import com.zkthink.base.mapper.SuperMapper;
import com.zkthink.clh.order.entity.ChlMemberTicheng;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;

import java.math.BigDecimal;

/**
 * <p>
 * Mapper 接口
 * 
 * </p>
 *
 * @author chenke
 * @date 2022-05-27
 */
@Repository
public interface ChlMemberTichengMapper extends SuperMapper<ChlMemberTicheng> {
    @Select("select IFNULL(sum(ticheng),0) from chl_member_ticheng where  DATE_FORMAT(create_time, '%Y-%m-%d') =#{time} and mid = #{mid}")
    BigDecimal Jinreshouyi(@Param("time") String time,@Param("mid") Long mid);
    @Select("select IFNULL(sum(ticheng),0) from chl_member_ticheng where mid = #{mid}")
    BigDecimal Leijishouyi(@Param("mid") Long mid);
}
